//
//  FPRegisterView.m
//  FilmParadise
//
//  Created by lanou3g on 15/7/23.
//  Copyright (c) 2015年 DLYgroup. All rights reserved.
//

#import "FPRegisterView.h"

@implementation FPRegisterView
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        UIView *statusView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, 20)];
        statusView.backgroundColor = [UIColor colorWithRed:1.000 green:0.093 blue:0.680 alpha:1.000];
        [self addSubview:statusView];
        
        UIView *backgroundView = [[UIView alloc]initWithFrame:CGRectMake(0, 64, kScreenWidth, kImageH(20))];
        backgroundView.backgroundColor = [UIColor colorWithWhite:0.757 alpha:1.000];
        [self addSubview:backgroundView];
        UIView *textView = [[UIView alloc]initWithFrame:CGRectMake(kImageW(10), backgroundView.y + backgroundView.height, kScreenWidth - kImageW(20), kImageH(150))];
//        textView.backgroundColor = [UIColor redColor];
        [self addSubview:textView];
        UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(0, kImageH(40), textView.width, kImageH(2))];
        UIView *lineView2 = [[UIView alloc]initWithFrame:CGRectMake(0, kImageH(80), textView.width, kImageH(2))];
        UIView *lineView3 = [[UIView alloc]initWithFrame:CGRectMake(0, kImageH(120), textView.width, kImageH(2))];
        
        
        lineView.backgroundColor = [UIColor colorWithWhite:0.796 alpha:1.000];
        lineView2.backgroundColor = [UIColor colorWithWhite:0.796 alpha:1.000];
        lineView3.backgroundColor = [UIColor colorWithWhite:0.796 alpha:1.000];
        [textView addSubview:lineView];
        [textView addSubview:lineView2];
        [textView addSubview:lineView3];
        
        UILabel *namelbl = [[UILabel alloc]initWithFrame:CGRectMake(kImageW(5), kImageH(5), kImageW(70), kImageH(30))];
        namelbl.text = @"用户名";
        [textView addSubview:namelbl];
        
        UILabel *pwdlbl = [[UILabel alloc]initWithFrame:CGRectMake(namelbl.x, namelbl.y + namelbl.height + kImageH(10), namelbl.width, namelbl.height)];
        pwdlbl.text = @"密码";
        [textView addSubview:pwdlbl];
        
        UILabel *phonelbl  = [[UILabel alloc]initWithFrame:CGRectMake(namelbl.x, pwdlbl.y + pwdlbl.height +kImageH(10), pwdlbl.width, pwdlbl.height)];
        phonelbl.text = @"手机号";
        [textView addSubview:phonelbl];
        
        
        self.userName = [[UITextField alloc]initWithFrame:CGRectMake(namelbl.x + namelbl.width, namelbl.y, kImageW(300), kImageH(30))];
        self.userName.placeholder = @"请输入用户名";
        [textView addSubview:_userName];
        
        self.userPwd = [[UITextField alloc]initWithFrame:CGRectMake(pwdlbl.x + pwdlbl.width, pwdlbl.y, _userName.width, _userName.height)];
        self.userPwd.placeholder = @"请输入密码";
        [textView addSubview:_userPwd];
        
        self.userPhone = [[UITextField alloc]initWithFrame:CGRectMake(phonelbl.x + phonelbl.width, phonelbl.y, _userPwd.width, _userPwd.height)];
        self.userPhone.placeholder = @"请输入手机号";
        [textView addSubview:_userPhone];
        
        self.registerBtn = [UIButton buttonWithType:UIButtonTypeSystem];
        self.registerBtn.frame = CGRectMake(kImageW(20), kImageH(280), kScreenWidth - kImageW(40), kImageH(30));
        self.registerBtn.layer.masksToBounds = YES;
        self.registerBtn.layer.cornerRadius = 15;
        self.registerBtn.backgroundColor = [UIColor colorWithRed:0.064 green:0.204 blue:1.000 alpha:1.000];
        [self.registerBtn setTitle:@"确认注册" forState:UIControlStateNormal];
        [self.registerBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [self addSubview:_registerBtn];
        
    }
    return self;
}





@end
